#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "query.h"
using namespace std;

int main()
{
	printf("query server start\n");
	printf("input what you want to query\n");
	printf("'q' to quit\n");
	char szword[1024]={0};
	string word;
	do
	{
		memset(szword, 0, sizeof(szword));
		scanf("%1023s", szword);
		if( strcmp(szword,"q") == 0)
		{
			return 0;
		}
		word = szword;
		query_and_show(word);
	}while(1);

	return 0;
}

